from django.conf.urls import url
from rest_framework.urlpatterns import format_suffix_patterns

from blockrestful import views

urlpatterns = [

    # web
    url(r'^blocks$', views.get_blocks),
    url(r'^block/(?P<key>[0-9a-zA-Z]+)$', views.get_block_byhash),
    url(r'^blockindex/(?P<key>[0-9]+)$', views.get_block_height),
    url(r'^txs$', views.get_txs_fromblock),
    url(r'^tx/(?P<key>[0-9a-zA-Z]+)$', views.get_tx_bytxid),
    url(r'^addr/(?P<key>[0-9a-zA-Z]+)$', views.get_txsinfo_bypubkey),
    url(r'^blockhash/(?P<key>[0-9a-zA-Z]+)$', views.get_blockhash_bytransaction_id),
]

urlpatterns = format_suffix_patterns(urlpatterns)
